<?php

namespace app\modules\borrowers\models;

use Yii;

/**
 * This is the model class for table "rah_borrower".
 *
 * @property integer $borrowerID
 * @property string $userName
 * @property string $englishName
 * @property string $nickName
 * @property string $custSeqNo
 * @property string $email
 * @property string $phone
 * @property string $birthday
 * @property string $tel
 * @property string $fax
 * @property string $webSite
 * @property string $province
 * @property string $city
 * @property string $county
 * @property string $billAddress
 * @property string $billPostCode
 * @property string $customerStatus
 * @property string $intention
 * @property string $accountStatus
 * @property string $accountDate
 * @property integer $isDeleted
 * @property string $identityNo
 * @property string $education
 * @property string $gender
 * @property string $duty
 * @property string $companyName
 * @property string $customerMantainUser
 * @property string $customerAuth
 * @property resource $comments
 * @property string $signContractDate
 * @property string $contractNo
 * @property string $createTime
 * @property string $createUser
 * @property string $updateTime
 * @property string $updateUser
 * @property string $owner
 * @property string $borrowerFrom
 * @property string $incomes
 * @property string $borrowAmt
 * @property integer $borrowMonth
 * @property string $customerLevel
 * @property string $customerType
 * @property string $paymentDay
 * @property string $auditAmt
 * @property integer $auditMonth
 * @property string $borrowerSeqNo
 * @property string $transferedUser
 * @property string $transferedDate
 * @property string $contractAmt
 * @property integer $payedMonth
 * @property integer $isDelayed
 * @property string $paymentAmtByMonth
 * @property string $delayedNextPaymentDay
 * @property string $homeAddress
 * @property string $nextMonth
 * @property string $delayedMonth
 * @property string $job
 * @property string $borrowPurpose
 * @property string $signContractAddress
 * @property string $delayedAmt
 * @property string $delayedMonthAmt
 * @property string $fangkuanBankName
 * @property string $fangkuanBankCode
 * @property string $borrowerCustomerType
 * @property string $windAmt
 * @property string $pactAddress
 * @property string $identityAddress
 * @property string $fangkuanTime
 * @property string $aheadPaymentDate
 * @property integer $isBorrowerRedeem
 * @property string $riskStatus
 * @property string $tapeAmt
 * @property string $fengxianjin
 * @property string $jieqingTime
 * @property string $tiqianhuankuanAmt
 * @property string $userName2ND
 * @property string $phone2ND
 * @property string $identityNo2ND
 * @property string $caiwukoukuanDate
 * @property string $team
 * @property string $Souce
 * @property integer $IsGuarantee
 * @property integer $IsPawn
 * @property double $Grade
 * @property integer $GroupId
 */
class Borrower extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'rah_borrower';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['birthday', 'accountDate', 'signContractDate', 'createTime', 'updateTime', 'paymentDay', 'transferedDate', 'delayedNextPaymentDay', 'nextMonth', 'delayedMonth', 'fangkuanTime', 'aheadPaymentDate', 'jieqingTime', 'caiwukoukuanDate'], 'safe'],
            [['isDeleted', 'borrowMonth', 'auditMonth', 'payedMonth', 'isDelayed', 'delayedAmt', 'delayedMonthAmt', 'isBorrowerRedeem', 'IsGuarantee', 'IsPawn', 'GroupId'], 'integer'],
            [['comments'], 'string'],
            [['incomes', 'borrowAmt', 'auditAmt', 'contractAmt', 'paymentAmtByMonth', 'windAmt', 'tapeAmt', 'fengxianjin', 'tiqianhuankuanAmt', 'Grade'], 'number'],
            [['userName', 'englishName', 'nickName', 'phone', 'webSite', 'education', 'contractNo', 'updateUser', 'userName2ND', 'phone2ND', 'identityNo2ND', 'team'], 'string', 'max' => 20],
            [['custSeqNo', 'email', 'city', 'billAddress'], 'string', 'max' => 32],
            [['tel', 'identityNo'], 'string', 'max' => 30],
            [['fax'], 'string', 'max' => 15],
            [['province', 'county', 'customerStatus', 'duty', 'companyName', 'customerMantainUser', 'customerAuth', 'createUser', 'owner', 'customerLevel', 'customerType', 'borrowerSeqNo', 'transferedUser'], 'string', 'max' => 50],
            [['billPostCode', 'intention', 'accountStatus', 'gender', 'riskStatus'], 'string', 'max' => 10],
            [['borrowerFrom', 'job', 'borrowPurpose', 'signContractAddress', 'fangkuanBankName', 'fangkuanBankCode', 'borrowerCustomerType'], 'string', 'max' => 45],
            [['homeAddress', 'pactAddress', 'identityAddress'], 'string', 'max' => 100],
            [['Souce'], 'string', 'max' => 40],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'borrowerID' => 'Borrower ID',
            'userName' => 'User Name',
            'englishName' => 'English Name',
            'nickName' => 'Nick Name',
            'custSeqNo' => 'Cust Seq No',
            'email' => 'Email',
            'phone' => 'Phone',
            'birthday' => 'Birthday',
            'tel' => 'Tel',
            'fax' => 'Fax',
            'webSite' => 'Web Site',
            'province' => 'Province',
            'city' => 'City',
            'county' => 'County',
            'billAddress' => 'Bill Address',
            'billPostCode' => 'Bill Post Code',
            'customerStatus' => 'Customer Status',
            'intention' => 'Intention',
            'accountStatus' => 'Account Status',
            'accountDate' => 'Account Date',
            'isDeleted' => 'Is Deleted',
            'identityNo' => 'Identity No',
            'education' => 'Education',
            'gender' => 'Gender',
            'duty' => 'Duty',
            'companyName' => 'Company Name',
            'customerMantainUser' => 'Customer Mantain User',
            'customerAuth' => 'Customer Auth',
            'comments' => 'Comments',
            'signContractDate' => 'Sign Contract Date',
            'contractNo' => 'Contract No',
            'createTime' => 'Create Time',
            'createUser' => 'Create User',
            'updateTime' => 'Update Time',
            'updateUser' => 'Update User',
            'owner' => 'Owner',
            'borrowerFrom' => 'Borrower From',
            'incomes' => 'Incomes',
            'borrowAmt' => 'Borrow Amt',
            'borrowMonth' => 'Borrow Month',
            'customerLevel' => 'Customer Level',
            'customerType' => 'Customer Type',
            'paymentDay' => 'Payment Day',
            'auditAmt' => 'Audit Amt',
            'auditMonth' => 'Audit Month',
            'borrowerSeqNo' => 'Borrower Seq No',
            'transferedUser' => 'Transfered User',
            'transferedDate' => 'Transfered Date',
            'contractAmt' => 'Contract Amt',
            'payedMonth' => 'Payed Month',
            'isDelayed' => 'Is Delayed',
            'paymentAmtByMonth' => 'Payment Amt By Month',
            'delayedNextPaymentDay' => 'Delayed Next Payment Day',
            'homeAddress' => 'Home Address',
            'nextMonth' => 'Next Month',
            'delayedMonth' => 'Delayed Month',
            'job' => 'Job',
            'borrowPurpose' => 'Borrow Purpose',
            'signContractAddress' => 'Sign Contract Address',
            'delayedAmt' => 'Delayed Amt',
            'delayedMonthAmt' => 'Delayed Month Amt',
            'fangkuanBankName' => 'Fangkuan Bank Name',
            'fangkuanBankCode' => 'Fangkuan Bank Code',
            'borrowerCustomerType' => 'Borrower Customer Type',
            'windAmt' => 'Wind Amt',
            'pactAddress' => 'Pact Address',
            'identityAddress' => 'Identity Address',
            'fangkuanTime' => 'Fangkuan Time',
            'aheadPaymentDate' => 'Ahead Payment Date',
            'isBorrowerRedeem' => 'Is Borrower Redeem',
            'riskStatus' => 'Risk Status',
            'tapeAmt' => 'Tape Amt',
            'fengxianjin' => 'Fengxianjin',
            'jieqingTime' => 'Jieqing Time',
            'tiqianhuankuanAmt' => 'Tiqianhuankuan Amt',
            'userName2ND' => 'User Name2 Nd',
            'phone2ND' => 'Phone2 Nd',
            'identityNo2ND' => 'Identity No2 Nd',
            'caiwukoukuanDate' => 'Caiwukoukuan Date',
            'team' => 'Team',
            'Souce' => 'Souce',
            'IsGuarantee' => 'Is Guarantee',
            'IsPawn' => 'Is Pawn',
            'Grade' => 'Grade',
            'GroupId' => 'Group ID',
        ];
    }
}
